/**
 * Created by chengxiaolong on 2016/5/27.
 */
package com.invexer.common.puremvc.patterns.command {
import flash.events.Event;

import mx.rpc.events.FaultEvent;
import mx.utils.ObjectUtil;

import org.puremvc.as3.multicore.interfaces.INotification;
import org.puremvc.as3.multicore.patterns.command.SimpleCommand;

import org.as3commons.logging.ILogger;

import org.as3commons.logging.LoggerFactory;
public class InvexerSimpleCommandBase  extends SimpleCommand{
    private static var logger : ILogger = LoggerFactory.getClassLogger(InvexerSimpleCommandBase);

    override public function execute(notification:INotification):void {
        super.execute(notification);

        logger.info(this + " execute");
    }

    public function onSuccess(data:Object):void{
        logger.warn(this + " onSuccess: " + ObjectUtil.toString(data));

    }
    public function onFail(event:Event):void{
        logger.error( this + " onFail: " + event);
        if(event is FaultEvent){
            analyzeFaultEvent(event as FaultEvent);
        }
    }

    private function analyzeFaultEvent(event:FaultEvent):void{

    }
}
}
